<?php
if(!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
global $_G;

$out_biz_no = daddslashes($_GET['out_biz_no']);
if(!$out_biz_no) {
	exit(json_encode(['code'=>-1, 'msg'=>lang('message', 'payment_order_no_exist')]));
}

$order = C::t('common_payment_order')->fetch_by_biz_no($out_biz_no);
if(!$order || $order['expire_time'] < time()) {
	exit(json_encode(['code'=>-1, 'msg'=>lang('message', 'payment_order_no_exist')]));
}
if($order['status']>0) {
    exit(json_encode(['code'=>1, 'url'=>$order['return_url']]));
}else{
    exit(json_encode(['code'=>0]));
}
